package st.business.tepth.business.user.busnumber.finishholder.repair;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.business.tepth.business.bean.CompleteInfoBean;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;

/**
 * Author: shadow
 * Email:  1025431817@qq.com
 * Time:   2019-04-11 15:37
 */

public interface FinishRepairContract {
    interface View extends BaseView {
        void showInfos(CompleteInfoBean infoBean);

        void showError(String msg);

        void reworkSucceed();
    }

    interface Model extends BaseModel {
        Disposable getInfo(String token, int repairId,
                           OnDataConvertListener<CompleteInfoBean> listener);

        Disposable rework(String token, int repairId, String repairTaskIds,
                          String reason,
                             OnDataConvertListener<String> listener);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void getInfo(String token, int repairId);

        abstract void rework(String token, int repairId, String repairTaskIds,
                             String reason);
    }
}
